using System;
using Vici.Mvc;

namespace Demo.ViciMvc
{
    public class DemoSession : SessionBase
    {
        // This field is a convenient placeholder for type-safe storage of session data
        private readonly SessionProperty<User> _user = new SessionProperty<User>("User");  

        public User User
        {
            get { return _user.Value; }
            set { _user.Value = value; }
        }

        public bool LoggedIn
        {
            get { return (User != null); }
        }
    }
}
